﻿@{
    Layout = "~/Views/Shared/_Layout_Form.cshtml";
}

<!-- Main content -->
<section class="invoice">
    <!-- title row -->
    <div class="row">
        <div class="col-xs-12">
            <h2 class="page-header">
                <i class="fa fa-globe"></i>订单信息
                <small class="pull-right"></small>
            </h2>
        </div>
        <!-- /.col -->
    </div>
    <!-- info row -->
    <div class="row invoice-info">
        <div class="col-sm-6 invoice-col">
            <b>订单编号:</b>aaaaaaaaaaaaa
        </div>
        <!-- /.col -->
        <div class="col-sm-6 invoice-col">
            <b>创建时间:</b>
            aaaaaaaaaaaaa
        </div>
        <div class="col-sm-6 invoice-col">
            <b>采购企业:</b>
            aaaaaaaaaaaaa
        </div>
        <div class="col-sm-6 invoice-col">
            <b>销售金额:</b>
            aaaaaaaaaaaaa
        </div>
        <!-- /.col -->
    </div>
    <!-- /.row -->
    <!-- title row -->
    <div class="row">
        <div class="col-xs-12">
            <h2 class="page-header">
                <i class="fa fa-globe"></i>商品信息
                <small class="pull-right"></small>
            </h2>
        </div>
        <!-- /.col -->
    </div>
    <!-- Table row -->
    <div class="row">
        <div class="col-xs-12 table-responsive">
            <table id="productTable" class="table table-striped"></table>
        </div>
        <!-- /.col -->
    </div>
</section>
<!-- /.content -->
<script>
    $(function () {
        initTable();
    });

    function initTable() {
        $('#productTable').bootstrapTable({
            url: '/ScmManage/OrderProduct/GetDataList',
            idField: 'Id',
            method: 'post',
            clickToSelect: false,
            contentType: 'application/x-www-form-urlencoded',
            queryParamsType: '',
            //pagination: false,
            //sidePagination: "server",
            //pageNumber: 1,
            //pageSize: 30,
            //pageList: [10, 30, 60, 100],
            columns: [
                { title: '商品SKU', field: 'SKU', width: '5%' },
                { title: '名称', field: 'Name', width: '5%' },
                { title: '品牌', field: 'Brand', width: '5%' },
                {
                    title: '主图', field: 'ImagePath', width: '5%', formatter: function (value) {
                        return '<img src="{0}" width="200" height="200" />'.format(value);
                    }
                },
                { title: '产地', field: 'ProductArea', width: '5%' },
                { title: '包装清单', field: 'Pack', width: '5%' },
                { title: '原价', field: 'OriginalPrice', width: '5%' },
                { title: '售价', field: 'MallPrice', width: '5%' },
                { title: '数量', field: 'Quantity', width: '5%' },
                { title: '金额', field: 'Amount', width: '5%' }
            ],
            queryParams: function (params) {
                params['orderId'] = orderId;

                return params;
            }
        });
    }
</script>